-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(autoware_pointcloud_preprocessor): distortion corrector node update azimuth and distance #8380
feat(autoware_pointcloud_preprocessor): distortion corrector node update azimuth and distance #8380
Conversation
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
…muth_and_distance
sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp
Outdated
Show resolved
Hide resolved
sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp
Outdated
Show resolved
Hide resolved
…nge to rad Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
...essor/include/autoware/pointcloud_preprocessor/distortion_corrector/distortion_corrector.hpp
Outdated
Show resolved
Hide resolved
sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector_node.cpp
Show resolved
Hide resolved
sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp
Outdated
Show resolved
Hide resolved
sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp
Outdated
Show resolved
Hide resolved
sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just small change requests
…ctor.md Co-authored-by: Kenzo Lobos Tsunekawa <kenzo.lobos@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
@knzo25 kindly ping |
…muth_and_distance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
…muth_and_distance
@TakaHoribe @soblin @takayuki5168 |
…ate azimuth and distance (autowarefoundation#8380) * feat: add option for updating distance and azimuth value Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: clean code Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: remove space Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: add documentation Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix docs Signed-off-by: vividf <yihsiang.fang@tier4.jp> * feat: conversion formula implementation for degree, still need to change to rad Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix tests for AzimuthConversionExists function Signed-off-by: vividf <yihsiang.fang@tier4.jp> * feat: add fastatan to utils Signed-off-by: vividf <yihsiang.fang@tier4.jp> * feat: remove seperate sin, cos and use sin_and_cos function Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix readme Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix some grammar errors Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix spell error Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: set debug mode to false Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: set update_azimuth_and_distance default value to false Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: update readme Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: remove cout Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: add opencv license Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix grammar error Signed-off-by: vividf <yihsiang.fang@tier4.jp> * style(pre-commit): autofix * chore: add runtime error when azimuth conversion failed Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: change default pointcloud Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: change function name Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: move variables to structure Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: add random seed Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: rewrite get conversion function Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix opencv fast atan2 function Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix schema description Signed-off-by: vividf <yihsiang.fang@tier4.jp> * Update sensing/autoware_pointcloud_preprocessor/test/test_distortion_corrector_node.cpp Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> * Update sensing/autoware_pointcloud_preprocessor/test/test_distortion_corrector_node.cpp Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> * chore: move code to function for readability Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: simplify code Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix sentence, angle conversion Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: add more invalid condition Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix the string name to enum Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: remove runtime error Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: use optional for AngleConversion structure Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix bug and clean code Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: refactor the logic of calculating conversion Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: refactor function in unit test Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: RCLCPP_WARN_STREAM logging when failed to get angle conversion Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: improve normalize angle algorithm Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: improve multiple_of_90_degrees logic Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: add opencv license Signed-off-by: vividf <yihsiang.fang@tier4.jp> * style(pre-commit): autofix * chore: clean code Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix sentence Signed-off-by: vividf <yihsiang.fang@tier4.jp> * style(pre-commit): autofix * chore: add 0 0 0 points in test case Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix spell error Signed-off-by: vividf <yihsiang.fang@tier4.jp> * Update common/autoware_universe_utils/NOTICE Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> * Update sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector_node.cpp Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> * Update sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> * chore: use constexpr for threshold Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix the path of license Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: explanation for failures Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: use throttle Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix empty pointcloud function Signed-off-by: vividf <yihsiang.fang@tier4.jp> * refactor: change camel to snake case Signed-off-by: vividf <yihsiang.fang@tier4.jp> * Update sensing/autoware_pointcloud_preprocessor/include/autoware/pointcloud_preprocessor/distortion_corrector/distortion_corrector_node.hpp Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> * Update sensing/autoware_pointcloud_preprocessor/include/autoware/pointcloud_preprocessor/distortion_corrector/distortion_corrector_node.hpp Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> * style(pre-commit): autofix * Update sensing/autoware_pointcloud_preprocessor/test/test_distortion_corrector_node.cpp Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> * refactor: refactor virtual function in base class Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix test naming error Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix clang error Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix error Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix clangd Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: add runtime error if the setting is wrong Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: clean code Signed-off-by: vividf <yihsiang.fang@tier4.jp> * Update sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> * style(pre-commit): autofix * chore: fix unit test for runtime error Signed-off-by: vividf <yihsiang.fang@tier4.jp> * Update sensing/autoware_pointcloud_preprocessor/docs/distortion-corrector.md Co-authored-by: Kenzo Lobos Tsunekawa <kenzo.lobos@tier4.jp> * chore: fix offset_rad_threshold Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: change pointer to reference Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: snake_case for unit test Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix refactor process twist and imu Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix abs and return type of matrix to tf2 Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix grammar error Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: fix readme description Signed-off-by: vividf <yihsiang.fang@tier4.jp> * chore: remove runtime error Signed-off-by: vividf <yihsiang.fang@tier4.jp> --------- Signed-off-by: vividf <yihsiang.fang@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> Co-authored-by: Kenzo Lobos Tsunekawa <kenzo.lobos@tier4.jp>
Description
This PR solves the issue #3896.
Note that this PR is tested with the nebula PR tier4/nebula#180
base_link
) and theupdate_azimuth_and_distance
parameter is set totrue
. The azimuth values are calculated using thecv::fastAtan2
function.cv::fastAtan2
algorithm's accuracy of about 0.3 degrees, there is a possibility of changing beam order for high azimuth resolution LiDAR.velodyne
: (x: 0 degrees, y: 270 degrees)hesai
: (x: 90 degrees, y: 0 degrees)others
: (x: 0 degrees, y: 90 degrees) and (x: 270 degrees, y: 0 degrees)More information in https://github.com/vividf/autoware.universe/blob/feature/distortion_corrector_node_update_azimuth_and_distance/sensing/autoware_pointcloud_preprocessor/docs/distortion-corrector.md.
Additionally, this PR also removes the separate sin and cos by using the sin_and_cos function which can speed up the processing time (from this #7120)
Related links
Previous closed PR: #5560
Parent Issue:
How was this PR tested?
TIER4_INTERNAL_LINK
input/pointcloud
to/sensing/lidar/top/pointcloud_raw_ex
in the launch fileupdate_azimuth_and_distance
totrue
indistortion_corrector_node.param.yaml
ros2 launch autoware_pointcloud_preprocessor distortion_corrector_node.launch.xml
andros2 topic hz /sensing/lidar/top/rectified/pointcloud_ex
Time comparison
Input topic: /sensing/lidar/top/pointcloud_raw_ex (number of points is larger than the /sensing/lidar/top/mirror_cropped/pointcloud_ex)
bag: sample rosbag
frame: 121
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.